/ Assembly List / LJCDataAccess / DataAccess / ExecuteScriptText

Namespace - LJCDataAccess


Parameters
scriptText - The script text.

Syntax

C#
public Void ExecuteScriptText(String scriptText)

Executes a DB script text string. (E)

Example

C#
// See the DataAccess setup code on the DataAccess class page.

// Executes a DB Script text string.
private static void ExecuteScriptText(DataAccess dataAccess)
{
  // Create a DB Script string.
  StringBuilder builder = new StringBuilder(64);
  builder.AppendLine("insert into TestTable values('Name1');");
  builder.AppendLine("go");
  builder.AppendLine("delete from TestTable where Name = 'Name1';");
  builder.AppendLine("go");
  string scriptText = builder.ToString();

  dataAccess.ExecuteScriptText(scriptText);
}

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.